package momo.app.structure;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import momo.app.comms.SendChannel;


public class PendingLinkContainer
{
	private Map<String, PendingLink> map;
	
	public PendingLinkContainer()
	{
		map = Collections.synchronizedMap(new HashMap<String, PendingLink>());
	}
	
	public void put(Peer peer, PeerLink link, SendChannel channel)
	{
		map.put(peer.getId(), new PendingLink(peer, link, channel));
	}
	
	public PendingLink remove(String id)
	{
		return map.remove(id);
	} 
	
}//end of class PendingLinkContainer
